package com.want.client.loadbanlance;

import org.springframework.cloud.client.ServiceInstance;

import java.util.List;
import java.util.Set;

/**
 * @author WangZhiJian
 * @since 2021/12/19 0019
 */
public interface LoadBalanceSelect {

    /**
     * 从全列表中选出一个不在黑名单的服务实例
     * @param allServiceList
     * @param blackList
     * @return
     */
    ServiceInstance select(List<ServiceInstance> allServiceList, Set<ServiceInstance> blackList);
}
